﻿<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="productlist.aspx.cs" Inherits="Ecreate.Web.systemanage.product.productlist" %>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<html xmlns="http://www.w3.org/1999/xhtml" >
<head runat="server">
    <title></title>
   
        <link rel="stylesheet" type="text/css" href="/content/css/crud/stylecrud.css"/>  
        <link rel="stylesheet" type="text/css" href="/content/css/crud/gridview.css"/>                
</head>
<body>
    <form id="form1" runat="server">
    <div id="gridparent" class="gridparent">
            <div id="navigator" class="navigator" >
                <a href ="/systemanage/product/productcrud1.aspx?type=insert&classid=<%=Request.QueryString["classid"] %>" target="_self">添加此类别下产品</a>
            </div>
            <div>
                <asp:GridView ID="GridView1" runat="server" AutoGenerateColumns="False" 
                    Height="85px"  AllowPaging="True" 
                    onpageindexchanged="GridView1_PageIndexChanged" 
                    onpageindexchanging="GridView1_PageIndexChanging" PageSize="10" 
                    HorizontalAlign="Center"  CssClass="GridViewStyle" EmptyDataText="<table><tr><td>无数据</td></tr></table>" BorderStyle="None">
                    <Columns>
                        <asp:BoundField DataField="pid" HeaderText="产品编码"> 
                            <HeaderStyle Width="100px"  />
                        </asp:BoundField>
                        <asp:BoundField DataField="pname" HeaderText="产品名称" >
                            <HeaderStyle Width="100px"  />
                        </asp:BoundField>
                        <asp:BoundField DataField="pdescription" HeaderText="产品描述">
                             <HeaderStyle Width="100px"  />                        
                        </asp:BoundField>      
                        <asp:TemplateField HeaderText="图片预览">
                            <ItemTemplate >
                                <img src='<%#  getStringValue(Eval("pimageurl"))==""?"/content/images/Chart/NoData.jpg":Eval("pimageurl")    %>' width="50px" height="20px" />
                            </ItemTemplate>
                        </asp:TemplateField>
                        <asp:HyperLinkField HeaderText="" DataNavigateUrlFields="pid,classid" 
                            DataNavigateUrlFormatString="/systemanage/product/productcrud1.aspx?type=delete&pid={0}" 
                            DataTextField="pid" DataTextFormatString="<font color='red'>删除</font>"  />
                        <asp:HyperLinkField HeaderText="" DataNavigateUrlFields="pid" 
                            DataNavigateUrlFormatString="/systemanage/product/productcrud1.aspx?type=edit&pid={0}" 
                            DataTextField="pid" DataTextFormatString="<font color='red'>修改</font>" />
                    </Columns>
                    <FooterStyle CssClass="GridViewFooterStyle" />
                    <RowStyle CssClass="GridViewRowStyle" />   
                    <SelectedRowStyle CssClass="GridViewSelectedRowStyle" />
                    <PagerStyle CssClass="GridViewPagerStyle" />
                    <AlternatingRowStyle CssClass="GridViewAlternatingRowStyle" />
                    <HeaderStyle CssClass="GridViewHeaderStyle" />
                </asp:GridView>
            </div>

    </div>
    <input id="hid_classid" type="hidden" runat="server" />
    </form>
</body>
</html>
